<template>
  <dv-conical-column-chart v-if="pageFlag" :config="cfg" style="width: 100%;height: 100%;"></dv-conical-column-chart>
  <reacquire v-else @click="getData"/>
</template>

<script>
import reacquire from '../../components/reacquire/reacquire.vue';

export default {
  components: { reacquire },
  data() {
    return {
      pageFlag:false,
      timer:null,
      cfg:{
        data: [
          {
            name: '周口',
            value: 55
          },
          {
            name: '南阳',
            value: 120
          },
          {
            name: '西峡',
            value: 71
          },
          {
            name: '驻马店',
            value: 66
          },
          {
            name: '新乡',
            value: 80
          },
          {
            name: '信阳',
            value: 35
          },
          {
            name: '漯河',
            value: 15
          }
        ],
        img: [
          require('../../assets/img/left_top_hong.png'),
          require('../../assets/img/left_top_hong.png'),
          require('../../assets/img/left_top_hong.png'),
          require('../../assets/img/left_top_hong.png'),
          require('../../assets/img/left_top_hong.png'),
          require('../../assets/img/left_top_hong.png'),
          require('../../assets/img/left_top_hong.png')
        ],
        showValue: true
      }
    };
  },
  filters: {
    
  },
  created() {
    this.getData()
  },
  mounted() {
  },
  beforeDestroy() {
    if (this.timer) {
      clearInterval(this.timer)
      this.timer = null
    }
  },
  methods: {
    getData(){
      this.pageFlag=true
      this.switper
    },
    switper(){
      this.timer = setInterval(()=>{
        this.getData()
      },this.$store.state.setting.echartsAutoTime)
    }
  },
};
</script>
<style lang='scss' scoped>

</style>